package com.hy.beanDefinition;

import com.hy.domain.User;
import org.junit.Test;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;

public class BeanDefinitionTest2 {
	@Test
	public void beanDefinitionTest(){
		// 指定 class
		BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder.rootBeanDefinition(User.class.getName());
		// 获取 BeanDefinition
		AbstractBeanDefinition beanDefinition = beanDefinitionBuilder.getBeanDefinition();
		System.out.println("获取BeanDefinition: "+beanDefinition);
		System.out.println("bean name： "+beanDefinition.getBeanClassName());
	}
}
